﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Colorful.Furniture.SysManagement
{
    /// <summary>
    ///  数据字典输出体
    /// </summary>
    public class SysDictionaryOutputDto
    {
        /// <summary>
        ///  代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        ///  图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        ///  值
        /// </summary>
        public string Value { get; set; }
    }

    /// <summary>
    ///  保存数据字典
    /// </summary>
    public class SysDictionarySaveInputOutputDto
    {
        /// <summary>
        ///  编码
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        ///  代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        ///  父级编码
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        ///  图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        ///  排序
        /// </summary>
        [RegularExpression(RegexSet.IntegerRegex, ErrorMessage = "请输入正确的排序值")]
        [Required(ErrorMessage = "请设置排序值")]
        public string Sort { get; set; }

        /// <summary>
        ///  标题
        /// </summary>
        [Required(ErrorMessage = "请输入名称")]
        public string Title { get; set; }

        /// <summary>
        ///  备注
        /// </summary>
        public string Remark { get; set; }
    }


    /// <summary>
    ///  数据字典表单
    /// </summary>
    public class SysDictionaryFormOutputDto
    {
        /// <summary>
        ///  编码
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        ///  代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        ///  父级编码
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        ///  图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        ///  排序
        /// </summary>
        public string Sort { get; set; }

        /// <summary>
        ///  标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        ///  备注
        /// </summary>
        public string Remark { get; set; }
    }
}